package org.bspv.pharma.manager.impl;

import java.util.List;

import org.bspv.pharma.dao.OrderDetailDAO;
import org.bspv.pharma.manager.OrderDetailManager;
import org.bspv.pharma.model.Order;
import org.bspv.pharma.model.OrderDetail;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 
 * @author guillaume
 *
 */
@Service(value = "orderDetailManager")
public class OrderDetailManagerImpl extends
		AbstractManagerImpl<OrderDetail, Long> implements OrderDetailManager {

    /**
     * Constructeur.
     * @param dao DAO
     */
	@Autowired
	public OrderDetailManagerImpl(OrderDetailDAO dao) {
		super(dao);
	}

	/**
	 * {@inheritDoc}
	 */
	public List<OrderDetail> findDetails(Order order) {
		return ((OrderDetailDAO) dao).findBy("order", order);
	}

}
